﻿using System.ComponentModel.DataAnnotations;

namespace NewRetail.Application.Components.StoreValueCard.Model
{
    /// <summary>
    /// 创建充值方案输入
    /// </summary>
    public class RechargeSchemeRequestDto
    {
        /// <summary>
        /// 充值金额，单位：分。
        /// </summary>
        public int rechargeAmount { get; set; }
        /// <summary>
        /// 赠送金额，单位：分。
        /// </summary>
        public int giftAmount { get; set; }
    }
    /// <summary>
    /// 修改输入
    /// </summary>
    public class UpdateRechargeSchemeRequestDto : RechargeSchemeRequestDto
    {
        public string Id { get; set; }
    }

    /// <summary>
    /// 查询输入
    /// </summary>
    public class RechargeSchemeSearchDto
    {
        /// <summary>
        /// 所在页
        /// </summary>
        public int PageIndex { get; set; } = 1;
        /// <summary>
        /// 每页记录数
        /// </summary>
        public int PageSize { get; set; } = 20;
    }

    /// <summary>
    /// 充值方案显示
    /// </summary>
    public class RechargeSchemeShowDto
    {
        /// <summary>
        /// id
        /// </summary>
        public string Id { get; set; }
        /// <summary>
        /// 充值金额，单位：分。
        /// </summary>
        public int rechargeAmount { get; set; }
        /// <summary>
        /// 赠送金额，单位：分。
        /// </summary>
        public int giftAmount { get; set; }
    }
    /// <summary>
    /// 充值记录查询输入
    /// </summary>
    public class RechargeRecordSearchDto
    {
        /// <summary>
        /// openId
        /// </summary>
        public string OpenId { get; set; }
        /// <summary>
        /// 会员号
        /// </summary>
        public string MemberNo { get; set; }
        /// <summary>
        /// 会员手机号
        /// </summary>
        public string MemberTel { get; set; }
        /// <summary>
        /// 所在页
        /// </summary>
        public int PageIndex { get; set; } = 1;
        /// <summary>
        /// 每页记录数
        /// </summary>
        public int PageSize { get; set; } = 20;
    }

    /// <summary>
    /// 充值记录显示结果
    /// </summary>
    public class RechargeRecordShowDto
    {
        /// <summary>
        /// id
        /// </summary>
        public string Id { get; set; }
        /// <summary>
        /// 充值日期
        /// </summary>
        public string rechargeDate { get; set; }
        /// <summary>
        /// 商户订单号
        /// </summary>
        public string outTradeNumber { get; set; }
        /// <summary>
        /// 充值时间
        /// </summary>
        public string rechargeDateTime { get; set; }
        /// <summary>
        /// openid
        /// </summary>
        public string openId { get; set; }
        /// <summary>
        /// 会员号
        /// </summary>
        public string memberNo { get; set; }
        /// <summary>
        /// 会员Id
        /// </summary>
        public string memberId { get; set; }
        /// <summary>
        /// 充值金额，单位：分。
        /// </summary>
        public int rechargeAmount { get; set; }
        /// <summary>
        /// 赠送金额，单位：分。
        /// </summary>
        public int giftAmount { get; set; }
        /// <summary>
        /// 订单状态  状态枚举值
        /// </summary>
        public int rechargeStatus { get; set; }
        ///// <summary>
        ///// 来源类型(1:储值卡充值/退款   2:储值卡支付)
        ///// </summary>
        //public int sourceType { get; set; }
        /// <summary>
        /// 支付方式(1:微信支付   2:支付宝支付  3:线下支付)
        /// </summary>
        public int payWay { get; set; }
        /// <summary>
        /// 备注
        /// </summary>
        public string? remark { get; set; }
    }
    /// <summary>
    /// 更新充值记录订单状态输入
    /// </summary>
    public class RechargeRecordUpdateStatusDto
    {
        /// <summary>
        /// openid
        /// </summary>
        [Required]
        public string openId { get; set; }
        /// <summary>
        /// 商户订单号
        /// </summary>
        [Required]
        public string outTradeNumber { get; set; }
        /// <summary>
        /// 订单状态  状态枚举值
        /// </summary>
        [Required]
        public int rechargeStatus { get; set; }
    }

    /// <summary>
    /// 储值卡充值更新充值余额
    /// </summary>
    public class RechargeRecordUpdateBalanceDto
    {
        /// <summary>
        /// 会员Id
        /// </summary>
        public string memberId { get; set; }
        /// <summary>
        /// 会员号
        /// </summary>
        public string memberNo { get; set; }
        /// <summary>
        /// 会员手机号
        /// </summary>
        public string memberTel { get; set; }
        /// <summary>
        /// 充值金额，单位：分。(由于要加解密，改成string)
        /// </summary>
        public string rechargeAmount { get; set; }
        /// <summary>
        /// 赠送金额，单位：分。(由于要加解密，改成string)
        /// </summary>
        public string giftAmount { get; set; }
        /// <summary>
        /// 备注
        /// </summary>
        public string? remark { get; set; }
        /// <summary>
        /// 是否根据充值方案计算赠送金额
        /// </summary>
        public bool? isByRechargeScheme { get; set; }
    }
    /// <summary>
    /// 储值卡余额使用（仅供POS端使用）
    /// </summary>
    public class CardUpdateBalanceChangeDto
    {
        /// <summary>
        /// 会员号
        /// </summary>
        [Required]
        public string memberNo { get; set; }
        /// <summary>
        /// 金额，单位：分。(由于要加解密，改成string)
        /// </summary>
        public string cardUseAmount { get; set; }
    }

    /// <summary>
    /// 储值卡余额变化查询输入
    /// </summary>
    public class CardBalanceChangeSearchDto
    {
        /// <summary>
        /// 会员号
        /// </summary>
        public string memberNo { get; set; }
        /// <summary>
        /// openid
        /// </summary>
        public string openId { get; set; }
        /// <summary>
        /// 所在页
        /// </summary>
        public int PageIndex { get; set; } = 1;
        /// <summary>
        /// 每页记录数
        /// </summary>
        public int PageSize { get; set; } = 20;
    }
    /// <summary>
    /// 获取储值卡余额变化列表显示
    /// </summary>
    public class CardBalanceChangesShowDto
    {
        /// <summary>
        /// id
        /// </summary>
        public string Id { get; set; }
        /// <summary>
        /// 变化日期
        /// </summary>
        public string changeDate { get; set; }
        /// <summary>
        /// 变化时间
        /// </summary>
        public string changeDateTime { get; set; }
        /// <summary>
        /// 订单号
        /// </summary>
        public string outTradeNumber { get; set; }
        /// <summary>
        /// openid
        /// </summary>
        public string openId { get; set; }
        /// <summary>
        /// 会员号
        /// </summary>
        public string memberNo { get; set; }
        /// <summary>
        /// 会员Id
        /// </summary>
        public string memberId { get; set; }
        /// <summary>
        /// 来源类型(1:储值卡充值/退款   2:储值卡支付)
        /// </summary>
        public int sourceType { get; set; }
        /// <summary>
        /// 金额  单位：元
        /// </summary>
        public decimal changeAmount { get; set; }
        /// <summary>
        /// 增加或减少金额标识(0:增加  1:减少)
        /// </summary>
        public int plusMinus { get; set; }
    }
}
